package me.zhanshi123.vipstorage.command;

import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;

public abstract class SubCommand {
    private String name;
    private CommandType type;

    public SubCommand(String name) {
        this.name = name;
        type = CommandType.PLAYER;
    }

    public SubCommand(String name, CommandType type) {
        this.name = name;
        this.type = type;
    }

    public abstract boolean onCommand(CommandSender sender, Command cmd, String label, String[] args);

    String getName() {
        return name;
    }

    public boolean isOpCommand() {
        return type == CommandType.OP;
    }
}
